package cn.xpp.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
        @TableId(type = IdType.AUTO)//上面指的是手动输入，需要自己配置id
    private long id;
    private String name;
    private Integer age;
    private String email;
    @Version//乐观锁version注解
    private int version;
    @TableLogic//逻辑删除
    private int deleted;
    //字段添加填充内容
    @TableField(fill = FieldFill.INSERT )  //会被自己配置的hander找到
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE )
    private Date updateTime;

}
